package com.lwq.config;



import org.springframework.cloud.gateway.route.RouteLocator;
import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName
 * @Description
 * @Author liwq
 * @Date 2021/2/23 15:57
 * @Version 1.0
 */
//@Configuration
public class GatewayRoutesConfiguration {

    //@Bean
    public RouteLocator customRouteLocator(RouteLocatorBuilder builder) {
        return builder.routes()
                .route("user-provider-route", r -> r.path("/student/**")
                        .uri("lb://user-provider"))
                .build();
    }

}
